import pandas as pd

df_excel=pd.read_excel('dataset.xlsx',sheet_name='Structures')
print(df_excel.head(5))
df_excel.to_excel('out1.xlsx',sheet_name='sheet1')

writer=pd.ExcelWriter('out2.xlsx')
df_excel.to_excel(writer,sheet_name='sheet1')
df_excel.to_excel(writer,sheet_name='sheet2')
writer.save()

with pd.ExcelWriter('out3.xlsx') as f:
    df_excel.to_excel(f,sheet_name='sheet1')
    df_excel.to_excel(f,sheet_name='sheet2')

df_excel.to_csv('data.csv',sep=',')
df_csv=pd.read_csv('data.csv',header=0,usecols=list(range(13)))
print(df_csv.head())
print(df_csv.shape)
df_csv.to_csv('out.csv',header=0,names=range(13),index_col=1)
df_csv.to_csv('out.csv',mode='a',header=None)

reader=pd.read_csv('out.csv',chunksize=200)
contents=[]
for data in reader:
    contents.append(data)
df_all=pd.concat(contents,axis=0)
print(df_all.shape)
print(df_all.head())

source=pd.read_csv('out.csv',iterator=True)
contents=[]
while True:
    try:
        reader=source.get_chunk(100)
        print(reader.shape)
        contents.append(reader)
    except Exception:
        break
df_all=pd.concat(contents)
print(df_all.shape)
